Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactored Functions’s Result Handling #14086

Merged

Conversation

yakovmanshin
Copy link
Contributor

  • Replaced the processedResponseData(from:error:) method with separate methods for handling data and errors, to better suit the async / await function-calling method (which returns either data or error but not both)

@yakovmanshin
Copy link
Contributor Author

Technically independent but semantically related is this pull request which makes all supported platforms use the async / await method. The code paths for older versions still work, but once they’re no longer needed, the current PR makes it easier to just remove them, without the need for further refactoring.

* Replaced the `processedResponseData(from:error:)` method with separate methods for handling data and errors, to better suit the async / await function-calling method (which returns either data or error but not both)
@yakovmanshin yakovmanshin force-pushed the refactored-Functions-result-handling branch from 884c7ce to ae9b2a9 Compare November 12, 2024 08:25
@ncooke3 ncooke3 self-assigned this Nov 14, 2024
Copy link
Member

@ncooke3 ncooke3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice readability improvement!

@ncooke3 ncooke3 merged commit 56d4c18 into firebase:main Nov 18, 2024
38 checks passed
@yakovmanshin yakovmanshin deleted the refactored-Functions-result-handling branch November 18, 2024 20:06
@firebase firebase locked and limited conversation to collaborators Dec 19, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants